#include <iostream>
using namespace std;
string t;
void test(char c,char n)
{
	n=n-'0';
	while(n--)
	t+=c;
}
int main()
{
	string s;cin>>s;
	
	for(int i=0;i<s.size();i++)
	{
		if(isdigit(s[i]))continue;
		if(isalpha(s[i])&&!isdigit(s[i+1]))
		test(s[i],1+'0');
      else if(isalpha(s[i])&&isdigit(s[i+1]))
      test(s[i],s[i+1]);
	}
	cout<<t;
	return 0;
}
